package com.hua.api.core.framework.http.exception;


import com.hua.api.core.framework.http.constant.OAuthErrorEnum;

public class ApiOAuthException extends Exception {
    private int code;
    private String msg;

    public ApiOAuthException(Throwable cause) {
        super(cause);
    }

    public ApiOAuthException(String msg) {
        this.msg = msg;
    }

    public ApiOAuthException(String msg, Throwable cause) {
        super(msg, cause);
    }

    public ApiOAuthException(OAuthErrorEnum oAuthErrorEnum) {
        this.code = oAuthErrorEnum.getCode();
        this.msg = oAuthErrorEnum.getMsg();
    }

    public ApiOAuthException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String toString() {
        return "ApiOAuthException{code=" + this.code + ", msg='" + this.msg + '\'' + '}';
    }
}
